import Vue, { DirectiveOptions } from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import 'element-ui/lib/theme-chalk/index.css'

import '@/assets/less/dubhe.less'
import * as directives from '@/directives'
import Warpper from '@/components/Warpper.vue'
import DubheButton from '@/components/Button/index.vue'

import ElementUI from 'element-ui'
Vue.use(ElementUI)

Object.keys(directives).forEach(key => {
	Vue.directive(key, (directives as { [key: string ]: DirectiveOptions })[key])
})

Vue.config.productionTip = false

Vue.component('dubhe-button', DubheButton)
Vue.component('Warpper', Warpper)
new Vue({
	router,
	store,
	render: h => h(App)
}).$mount('#app')
